#include<bits/stdc++.h>

using i64 = long long;
int main()
{
	int n,x,y,z;
	std::cin>>n>>x>>y>>z;
	if(x>y)
	{
		std::swap(x,y);
	}
	if(z>=x&&z<=y)
	{
		std::cout<<"Yes\n";
	}
	else
	{
		std::cout<<"No\n";
	}
	return 0;
}